package day_2022_4_to_7.day48;

import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;

/**
 * @author haomin
 * @date 2022/04/18 10:47
 **/
public class Day1_2_DeletePublicChar {
    public static void main(String[] args){
        Scanner in = new Scanner(System.in);
        String s1 = in.nextLine();
        String s2 = in.nextLine();

        // 将s2存入map
        Map<Character,Integer> map = new HashMap();
        for(int i = 0;i < s2.length();i++){
            char a = s2.charAt(i);
            map.put(a,0);
        }
        String ret = "";
        // 遍历s1
        for(int i = 0;i < s1.length();i++){
            char a = s1.charAt(i);
            // 如果s1的字符没在map里，就传入到ret
            if(!map.containsKey(a)){
                ret +=a;
            }
        }
        System.out.println(ret.toString());
    }
}